package com.xyyhome.web.love.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_l_dynamic_praise", schema = "xyyhome", catalog = "")
public class YLDynamicPraise {
    private String yldpId;
    private String yldpDynamicId;
    private String yldpUserId;
    private Timestamp yldpCreateTime;

    @Id
    @Column(name = "yldp_id", nullable = false, length = 36)
    public String getYldpId() {
        return yldpId;
    }

    public void setYldpId(String yldpId) {
        this.yldpId = yldpId;
    }

    @Basic
    @Column(name = "yldp_dynamic_id", nullable = true, length = 36)
    public String getYldpDynamicId() {
        return yldpDynamicId;
    }

    public void setYldpDynamicId(String yldpDynamicId) {
        this.yldpDynamicId = yldpDynamicId;
    }

    @Basic
    @Column(name = "yldp_user_id", nullable = true, length = 36)
    public String getYldpUserId() {
        return yldpUserId;
    }

    public void setYldpUserId(String yldpUserId) {
        this.yldpUserId = yldpUserId;
    }

    @Basic
    @Column(name = "yldp_create_time", nullable = true)
    public Timestamp getYldpCreateTime() {
        return yldpCreateTime;
    }

    public void setYldpCreateTime(Timestamp yldpCreateTime) {
        this.yldpCreateTime = yldpCreateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YLDynamicPraise that = (YLDynamicPraise) o;

        if (yldpId != null ? !yldpId.equals(that.yldpId) : that.yldpId != null) return false;
        if (yldpDynamicId != null ? !yldpDynamicId.equals(that.yldpDynamicId) : that.yldpDynamicId != null)
            return false;
        if (yldpUserId != null ? !yldpUserId.equals(that.yldpUserId) : that.yldpUserId != null) return false;
        if (yldpCreateTime != null ? !yldpCreateTime.equals(that.yldpCreateTime) : that.yldpCreateTime != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = yldpId != null ? yldpId.hashCode() : 0;
        result = 31 * result + (yldpDynamicId != null ? yldpDynamicId.hashCode() : 0);
        result = 31 * result + (yldpUserId != null ? yldpUserId.hashCode() : 0);
        result = 31 * result + (yldpCreateTime != null ? yldpCreateTime.hashCode() : 0);
        return result;
    }
}
